<html>
<head>
    <meta charset="utf-8"/>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>

<title>SemanticUI学习（5）输入框 | 絷缘的博客</title>

<link rel="shortcut icon" href="https://zydnc.gitee.io/favicon.ico?v=1732378515642">

<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://zydnc.gitee.io/styles/main.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css">

<script src="https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets/highlight.min.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
<script src="https://cdn.bootcss.com/highlight.js/9.15.10/languages/dart.min.js"></script>

<script src="https://cdn.jsdelivr.net/npm/moment@2.27.0/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/js/bootstrap.min.js"></script>
<!-- DEMO JS -->
<!--<script src="media/scripts/index.js"></script>-->



    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.css">
 <script src='//unpkg.com/valine/dist/Valine.min.js'></script>
</head>
<body>
<div class="main gt-bg-theme-color-first">
    <nav class="navbar navbar-expand-lg">
    <div class="navbar-brand">
        <img class="user-avatar" src="/images/avatar.png" alt="头像">
        <div class="site-name gt-c-content-color-first">
            絷缘的博客
        </div>
    </div>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <i class="fas fa-bars gt-c-content-color-first" style="font-size: 18px"></i>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <div class="navbar-nav mr-auto" style="text-align: center">
            
                <div class="nav-item">
                    
                        <a href="/" class="menu gt-a-link">
                            首页
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/archives" class="menu gt-a-link">
                            归档
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/tags" class="menu gt-a-link">
                            标签
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/about" class="menu gt-a-link">
                            关于
                        </a>
                    
                </div>
            
                <div class="nav-item">
                    
                        <a href="/friends" class="menu gt-a-link">
                            友链
                        </a>
                    
                </div>
            
        </div>
        <div style="text-align: center">
            <form id="gridea-search-form" style="position: relative" data-update="1732378515642" action="/search/index.html">
                <input class="search-input" autocomplete="off" spellcheck="false" name="q" placeholder="搜索文章" />
                <i class="fas fa-search gt-c-content-color-first" style="position: absolute; top: 9px; left: 10px;"></i>
            </form>
        </div>
    </div>
</nav>

    <div class="post-container">
        <div class="post-detail gt-bg-theme-color-second">
            <article class="gt-post-content">
                <h2 class="post-title">
                    SemanticUI学习（5）输入框
                </h2>
                <div class="post-info">
                    <time class="post-time gt-c-content-color-first">
                        · 2021-01-09 ·
                    </time>
                    
                        <a href="https://zydnc.gitee.io/semanticui/" class="post-tags">
                            # SemanticUI
                        </a>
                    
                        <a href="https://zydnc.gitee.io/qjuNtQyCB/" class="post-tags">
                            # 自学
                        </a>
                    
                        <a href="https://zydnc.gitee.io/2WP8Q3KZTb/" class="post-tags">
                            # 前端
                        </a>
                    
                </div>
                <div class="post-content">
                    <h2 id="一-引入资源文件">一、引入资源文件</h2>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css&quot;/&gt;
&lt;script src=&quot;https://code.jquery.com/jquery-3.1.1.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<h2 id="二-标准输入框">二、标准输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;标准输入框&quot;&gt;
&lt;/div&gt;
</code></pre>
<h2 id="三-聚焦输入框">三、聚焦输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui focus input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;聚焦输入框&quot;&gt;
&lt;/div&gt;
</code></pre>
<h2 id="四-加载图标输入框">四、加载图标输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui left icon loading input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;加载图标输入框&quot;&gt;
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div class=&quot;ui right icon loading input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;加载图标输入框&quot;&gt;
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
</code></pre>
<h2 id="五-不同状态输入框">五、不同状态输入框</h2>
<pre><code class="language-html">&lt;!--禁止输入框--&gt;
&lt;div class=&quot;ui disabled input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;禁止输入框&quot;&gt;
&lt;/div&gt;
&lt;!--错误输入框--&gt;
&lt;div class=&quot;ui error input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;错误输入框&quot;&gt;
&lt;/div&gt;
</code></pre>
<h2 id="六-带标签输入框">六、带标签输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui labeled input&quot;&gt;
    &lt;div class=&quot;ui orange label&quot;&gt;https://&lt;/div&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带标签输入框&quot;&gt;
&lt;/div&gt;
</code></pre>
<h2 id="七-带图标输入框">七、带图标输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui right icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带图标输入框&quot;&gt;
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div class=&quot;ui left icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带图标输入框&quot;&gt;
    &lt;i class=&quot;user add icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div class=&quot;ui right icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带图标输入框&quot;&gt;
    &lt;i class=&quot;circular search link icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
&lt;div class=&quot;ui right icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带图标输入框&quot;&gt;
    &lt;i class=&quot;circular search inverted link icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
</code></pre>
<h2 id="八-带下拉列表输入框">八、带下拉列表输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui right labeled input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;带下拉列表输入框&quot;&gt;
    &lt;div class=&quot;ui dropdown label&quot;&gt;
        &lt;div class=&quot;text&quot;&gt;.com&lt;/div&gt;
        &lt;i class=&quot;dropdown icon&quot;&gt;&lt;/i&gt;
        &lt;div class=&quot;menu&quot;&gt;
            &lt;div class=&quot;item&quot;&gt;.com&lt;/div&gt;
            &lt;div class=&quot;item&quot;&gt;.cn&lt;/div&gt;
            &lt;div class=&quot;item&quot;&gt;.org&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<h2 id="九-图标标签输入框">九、图标+标签输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui right labeled left icon input&quot;&gt;
    &lt;i class=&quot;tags icon&quot;&gt;&lt;/i&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;图标标签组合&quot;&gt;
    &lt;div class=&quot;ui tag green label&quot;&gt;添加标签&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十-角落图标输入框">十、角落图标输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui left corner labeled input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索...&quot;&gt;
    &lt;div class=&quot;ui left corner red label&quot;&gt;
        &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
    &lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;ui right corner labeled input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索...&quot;&gt;
        &lt;div class=&quot;ui right corner red label&quot;&gt;
            &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
        &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十一-带按钮的输入框">十一、带按钮的输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui action input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索...&quot;&gt;
    &lt;button class=&quot;ui icon button&quot;&gt;
        &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
    &lt;/button&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十二-透明输入框">十二、透明输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui transparent input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索...&quot;&gt;
&lt;/div&gt;

&lt;div class=&quot;ui transparent right icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索...&quot;&gt; 
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;

&lt;div class=&quot;ui transparent left icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索&quot;&gt;
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十三-适应容器输入框">十三、适应容器输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui fluid right icon input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;搜索&quot;&gt;
    &lt;i class=&quot;search icon&quot;&gt;&lt;/i&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十四-不同尺寸输入框">十四、不同尺寸输入框</h2>
<pre><code class="language-html">&lt;div class=&quot;ui mini input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;mini输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui tiny input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;tiny输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui small input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;small输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui medium input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;medium输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui large input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;large输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui big input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;big输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui huge input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;huge输入框&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;ui massive input&quot;&gt;
    &lt;input type=&quot;text&quot; placeholder=&quot;massive输入框&quot;&gt;
&lt;/div&gt;
</code></pre>
<h2 id="十五-实际效果">十五、实际效果</h2>
<figure data-type="image" tabindex="1"><img src="https://zydnc.gitee.io/post-images/1610206026222.png" alt="" loading="lazy"></figure>
<blockquote>
<p>原文作者：絷缘<br>
作者邮箱：zhiyuanworkemail@163.com<br>
原文地址：<a href="https://zhiyuandnc.github.io/T1juUwu3S/">https://zhiyuandnc.github.io/T1juUwu3S/</a><br>
版权声明：本文为博主原创文章，转载请注明原文链接作者信息</p>
</blockquote>

                </div>
            </article>
        </div>

        
            <div class="next-post">
                <div class="next gt-c-content-color-first">下一篇</div>
                <a href="https://zydnc.gitee.io/6S9G53Ktp/" class="post-title gt-a-link">
                    SemanticUI学习（4）图片
                </a>
            </div>
        

        

        

        

        <div class="site-footer gt-c-content-color-first">
    <div class="slogan gt-c-content-color-first">事实不以人的意志为转移</div>
    <div class="social-container">
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-github gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-telegram gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-qq gt-c-content-color-first"></i>
                </a>
            
        
            
                <a href="#" target="_blank">
                    <i class="fab fa-bilibili gt-c-content-color-first"></i>
                </a>
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
            
        
    </div>
    <div class="footer-info">
        Copyright&ensp;&copy;&ensp;絷缘的博客<br/><a href="https://beian.miit.gov.cn/" target="_blank">晋ICP备20001723号-1</a>
    </div>
    <div>
        Theme by <a href="https://imhanjie.com/" target="_blank">imhanjie</a>, Powered by <a
                href="https://github.com/getgridea/gridea" target="_blank">Gridea | <a href="https://zydnc.gitee.io/atom.xml" target="_blank">RSS</a></a>
    </div>
</div>

<script>
  hljs.initHighlightingOnLoad()
</script>

    </div>
</div>
</body>
</html>
